package utils;

import org.apache.log4j.Logger;
/**
 * Log utility
 * 
 * @author makendy
 *
 */
public class Log {
	private static Logger logger;
	
	

	/**
	 * log the message as info
	 * 
	 * @param log
	 * @param aclass
	 */
	public static void logInfo(String log, Class<?> aclass)
	{		
		logger = Logger.getLogger(aclass);
		logger.info(log);
	}
	
	/**
	 * log the message as error
	 * 
	 * @param log
	 * @param aclass
	 */
	public static void logError(String log, Class<?> aclass)
	{		
		logger = Logger.getLogger(aclass);
		logger.error(log);		
	}
	
	/**
	 * log the message as warning
	 * 
	 * @param log
	 * @param aclass
	 */
	public static void logWarning(String log, Class<?> aclass)
	{
		logger = Logger.getLogger(aclass);		
		logger.warn(log);		
	}
	
	/**
	 * log the message as fatal
	 * 
	 * @param log
	 * @param aclass
	 */
	public static void logFatal(String log, Class<?> aclass)
	{
		logger = Logger.getLogger(aclass);		
		logger.fatal(log);		
	}
}
